<?php


//This output goes into #right_nav_container_ajax div tag of default.ctp
e("<h2>Ferdos family thank you for the order!</h2>");
e("<div id=readonlybill name=robill align=center>");
e("<table border=1>");
//debug($output);
$total = 0.00;
foreach ($orderLineItems as $menu_item_id => $detailsArray) {
    //$detailsArray data structure is defined in  writingpad_controller
    $name = $detailsArray["menu_item_name"];
    $qty = $detailsArray["quantity"];
    $price = $detailsArray["price"];
    $itemCost = $price * $qty;
    $total = $total + ($itemCost);
    e("<tr>");
    e("<td>" . $name . "</td>" . "<td>" . $qty . "</td>" . "<td>$" . $itemCost . "</td>");
    e("</tr>");
}
e("<tr>");
e("<td colspan=2>" . "Total" . "</td>" . "<td>$" . $total . "</td>");
e("</tr>");
e("</table>");
e("</div>");
?>